package com.dj.mingkong.common.exception;


/**
 * @author zenglonghui
 * @date: 2022/5/17 17:53
 */
public class ExceptionFactory {
    public ExceptionFactory() {
    }

    public static BizException bizException(String errorMessage) {
        return new BizException(errorMessage);
    }

    public static BizException bizException(String errorCode, String errorMessage) {
        return new BizException(errorCode, errorMessage);
    }

    public static SystemException sysException(String errorMessage) {
        return new SystemException(errorMessage);
    }

    public static SystemException sysException(String errorCode, String errorMessage) {
        return new SystemException(errorCode, errorMessage);
    }

    public static SystemException sysException(String errorMessage, Throwable e) {
        return new SystemException(errorMessage, e);
    }

    public static SystemException sysException(String errorCode, String errorMessage, Throwable e) {
        return new SystemException(errorCode, errorMessage, e);
    }
}
